using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlTypes;
using System.Data.SqlClient;
using System.Text;
using ECommerce.DAL;


namespace Entity
{
    /// <summary>
    /// This object represents the Private Fields of TblProductStock.
    /// </summary>

    [System.ComponentModel.DataObject]
    public class TblProductStock : DatabaseUtility
    {
        #region TblProductStock Private Fields


        Int32 _stockId;
        String _size = String.Empty;
        Decimal _weight;
        String _weightUnit = String.Empty;
        Int32 _widthWholeNumberFirstDigit;
        Int32 _widthWholeNumberSecondDigit;
        Int32 _widthFractionNumberFirstDigit;
        Int32 _widthFractionNumberSecondDigit;
        Decimal _widthValue;
        String _widthUnit = String.Empty;
        Int32 _diameterWholeNumberFirstDigit;
        Int32 _diameterWholeNumberSecondDigit;
        Int32 _diameterFractionNumberFirstDigit;
        Int32 _diameterFractionNumberSecondDigit;
        Decimal _diameterValue;
        String _diameterUnit = String.Empty;
        Int32 _threadCountWholeNumberFirstDigit;
        Int32 _threadCountWholeNumberSecondDigit;
        Int32 _threadCountFractionNumberFirstDigit;
        Int32 _threadCountFractionNumberSecondDigit;
        Decimal _threadCountValue;
        String _threadCountUnit = String.Empty;
        Int32 _lengthWholeNumberFirstDigit;
        Int32 _lengthWholeNumberSecondDigit;
        Int32 _lengthFractionNumberFirstDigit;
        Int32 _lengthFractionNumberSecondDigit;
        Decimal _lengthValue;
        String _lengthUnit = String.Empty;
        Int32 _stockAmount;
        Int32 _productId;
        Int32 _pkgQuanity;
        Boolean _useDecimalForSize;

        #endregion
        #region TblProductStock Constractor
        /// <summary>
        /// Creates an empty object of TblProductStock. 
        /// This is mainly used to create a new instance of TblProductStock to add a new TblProductStock.
        /// </summary>
        public TblProductStock() { }


        /// <summary>
        /// Used to retrieve employee information from database, 
        /// which is also used by Update method to save information of an existing TblProductStock.
        /// </summary>
        public TblProductStock
        (
            Int32 stockId,
            String size,
            Decimal weight,
            String weightUnit,
            Int32 widthWholeNumberFirstDigit,
            Int32 widthWholeNumberSecondDigit,
            Int32 widthFractionNumberFirstDigit,
            Int32 widthFractionNumberSecondDigit,
            Decimal widthValue,
            String widthUnit,
            Int32 diameterWholeNumberFirstDigit,
            Int32 diameterWholeNumberSecondDigit,
            Int32 diameterFractionNumberFirstDigit,
            Int32 diameterFractionNumberSecondDigit,
            Decimal diameterValue,
            String diameterUnit,
            Int32 threadCountWholeNumberFirstDigit,
            Int32 threadCountWholeNumberSecondDigit,
            Int32 threadCountFractionNumberFirstDigit,
            Int32 threadCountFractionNumberSecondDigit,
            Decimal threadCountValue,
            String threadCountUnit,
            Int32 lengthWholeNumberFirstDigit,
            Int32 lengthWholeNumberSecondDigit,
            Int32 lengthFractionNumberFirstDigit,
            Int32 lengthFractionNumberSecondDigit,
            Decimal lengthValue,
            String lengthUnit,
            Int32 stockAmount,
            Int32 productId,
            Int32 pkgQuanity,
            Boolean useDecimalForSize
        )
        {
            _stockId = stockId;
            _size = size;
            _weight = weight;
            _weightUnit = weightUnit;
            _widthWholeNumberFirstDigit = widthWholeNumberFirstDigit;
            _widthWholeNumberSecondDigit = widthWholeNumberSecondDigit;
            _widthFractionNumberFirstDigit = widthFractionNumberFirstDigit;
            _widthFractionNumberSecondDigit = widthFractionNumberSecondDigit;
            _widthValue = widthValue;
            _widthUnit = widthUnit;
            _diameterWholeNumberFirstDigit = diameterWholeNumberFirstDigit;
            _diameterWholeNumberSecondDigit = diameterWholeNumberSecondDigit;
            _diameterFractionNumberFirstDigit = diameterFractionNumberFirstDigit;
            _diameterFractionNumberSecondDigit = diameterFractionNumberSecondDigit;
            _diameterValue = diameterValue;
            _diameterUnit = diameterUnit;
            _threadCountWholeNumberFirstDigit = threadCountWholeNumberFirstDigit;
            _threadCountWholeNumberSecondDigit = threadCountWholeNumberSecondDigit;
            _threadCountFractionNumberFirstDigit = threadCountFractionNumberFirstDigit;
            _threadCountFractionNumberSecondDigit = threadCountFractionNumberSecondDigit;
            _threadCountValue = threadCountValue;
            _threadCountUnit = threadCountUnit;
            _lengthWholeNumberFirstDigit = lengthWholeNumberFirstDigit;
            _lengthWholeNumberSecondDigit = lengthWholeNumberSecondDigit;
            _lengthFractionNumberFirstDigit = lengthFractionNumberFirstDigit;
            _lengthFractionNumberSecondDigit = lengthFractionNumberSecondDigit;
            _lengthValue = lengthValue;
            _lengthUnit = lengthUnit;
            _stockAmount = stockAmount;
            _productId = productId;
            _pkgQuanity = pkgQuanity;
            _useDecimalForSize = useDecimalForSize;
        }

        #endregion
        #region TblProductStock Properties

        /***********************************************************************************************
                                    -- PROPERTIES --        
         Contains all the properties representing the data fields of the current entity.
         ***********************************************************************************************/

        /// <summary>
        /// This is the Primary key value of the StockId, which can't be assigned from the application,
        /// to ensure the data consistancy, by not letting the user to change the PK_TblProductStock to update the data of an another TblProductStock instance.
        /// For view or updation purpose, every TblProductStock will be retrieved thru the proper 'Get' method.
        /// </summary>

        public Int32 StockId
        {
            get { return _stockId; }
        }


        public String Size
        {
            get { return _size; }
            set { _size = value; }
        }

        public Decimal Weight
        {
            get { return _weight; }
            set { _weight = value; }
        }

        public String WeightUnit
        {
            get { return _weightUnit; }
            set { _weightUnit = value; }
        }

        public Int32 WidthWholeNumberFirstDigit
        {
            get { return _widthWholeNumberFirstDigit; }
            set { _widthWholeNumberFirstDigit = value; }
        }

        public Int32 WidthWholeNumberSecondDigit
        {
            get { return _widthWholeNumberSecondDigit; }
            set { _widthWholeNumberSecondDigit = value; }
        }

        public Int32 WidthFractionNumberFirstDigit
        {
            get { return _widthFractionNumberFirstDigit; }
            set { _widthFractionNumberFirstDigit = value; }
        }

        public Int32 WidthFractionNumberSecondDigit
        {
            get { return _widthFractionNumberSecondDigit; }
            set { _widthFractionNumberSecondDigit = value; }
        }

        public Decimal WidthValue
        {
            get { return _widthValue; }
            set { _widthValue = value; }
        }

        public String WidthUnit
        {
            get { return _widthUnit; }
            set { _widthUnit = value; }
        }

        public Int32 DiameterWholeNumberFirstDigit
        {
            get { return _diameterWholeNumberFirstDigit; }
            set { _diameterWholeNumberFirstDigit = value; }
        }

        public Int32 DiameterWholeNumberSecondDigit
        {
            get { return _diameterWholeNumberSecondDigit; }
            set { _diameterWholeNumberSecondDigit = value; }
        }

        public Int32 DiameterFractionNumberFirstDigit
        {
            get { return _diameterFractionNumberFirstDigit; }
            set { _diameterFractionNumberFirstDigit = value; }
        }

        public Int32 DiameterFractionNumberSecondDigit
        {
            get { return _diameterFractionNumberSecondDigit; }
            set { _diameterFractionNumberSecondDigit = value; }
        }

        public Decimal DiameterValue
        {
            get { return _diameterValue; }
            set { _diameterValue = value; }
        }

        public String DiameterUnit
        {
            get { return _diameterUnit; }
            set { _diameterUnit = value; }
        }

        public Int32 ThreadCountWholeNumberFirstDigit
        {
            get { return _threadCountWholeNumberFirstDigit; }
            set { _threadCountWholeNumberFirstDigit = value; }
        }

        public Int32 ThreadCountWholeNumberSecondDigit
        {
            get { return _threadCountWholeNumberSecondDigit; }
            set { _threadCountWholeNumberSecondDigit = value; }
        }

        public Int32 ThreadCountFractionNumberFirstDigit
        {
            get { return _threadCountFractionNumberFirstDigit; }
            set { _threadCountFractionNumberFirstDigit = value; }
        }

        public Int32 ThreadCountFractionNumberSecondDigit
        {
            get { return _threadCountFractionNumberSecondDigit; }
            set { _threadCountFractionNumberSecondDigit = value; }
        }

        public Decimal ThreadCountValue
        {
            get { return _threadCountValue; }
            set { _threadCountValue = value; }
        }

        public String ThreadCountUnit
        {
            get { return _threadCountUnit; }
            set { _threadCountUnit = value; }
        }

        public Int32 LengthWholeNumberFirstDigit
        {
            get { return _lengthWholeNumberFirstDigit; }
            set { _lengthWholeNumberFirstDigit = value; }
        }

        public Int32 LengthWholeNumberSecondDigit
        {
            get { return _lengthWholeNumberSecondDigit; }
            set { _lengthWholeNumberSecondDigit = value; }
        }

        public Int32 LengthFractionNumberFirstDigit
        {
            get { return _lengthFractionNumberFirstDigit; }
            set { _lengthFractionNumberFirstDigit = value; }
        }

        public Int32 LengthFractionNumberSecondDigit
        {
            get { return _lengthFractionNumberSecondDigit; }
            set { _lengthFractionNumberSecondDigit = value; }
        }

        public Decimal LengthValue
        {
            get { return _lengthValue; }
            set { _lengthValue = value; }
        }

        public String LengthUnit
        {
            get { return _lengthUnit; }
            set { _lengthUnit = value; }
        }

        public Int32 StockAmount
        {
            get { return _stockAmount; }
            set { _stockAmount = value; }
        }

        public Int32 ProductId
        {
            get { return _productId; }
            set { _productId = value; }
        }

        public Int32 PkgQuanity
        {
            get { return _pkgQuanity; }
            set { _pkgQuanity = value; }
        }

        public Boolean UseDecimalForSize
        {
            get { return _useDecimalForSize; }
            set { _useDecimalForSize = value; }
        }


        #endregion
        #region TblProductStock Static Methods
        /************************************************************************************
                                    -- CREATE METHOD (STATIC) --
        *************************************************************************************/
        /************************* Architecure note:**********************************
        Note 1:
        This method is specially useful for the case, where we need to use Object Data Source controls.
        For ObjectDataSource/SqlDataSource controls, the insert/update metnod requires paramters methods, rather property based methods.
        However, there is still a way to pass property based objects as method parameter for data source controls, 
        but in that case we could not use Sql type, as view controls or asp parameter control can only contain few of primitive type.
        The main reason to remain the Sql Type in our object architecture is it is faster and contains better way for null value support.
        
        Note 2: 
        Non-primary key: it should be primitive type, as the asp paramter control (included in data source control) supports only primitive types.
        /*****************************************************************************/
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
        public static Int32 CreateNewTblProductStock
        (
            String size,
            Decimal weight,
            String weightUnit,
            Int32 widthWholeNumberFirstDigit,
            Int32 widthWholeNumberSecondDigit,
            Int32 widthFractionNumberFirstDigit,
            Int32 widthFractionNumberSecondDigit,
            Decimal widthValue,
            String widthUnit,
            Int32 diameterWholeNumberFirstDigit,
            Int32 diameterWholeNumberSecondDigit,
            Int32 diameterFractionNumberFirstDigit,
            Int32 diameterFractionNumberSecondDigit,
            Decimal diameterValue,
            String diameterUnit,
            Int32 threadCountWholeNumberFirstDigit,
            Int32 threadCountWholeNumberSecondDigit,
            Int32 threadCountFractionNumberFirstDigit,
            Int32 threadCountFractionNumberSecondDigit,
            Decimal threadCountValue,
            String threadCountUnit,
            Int32 lengthWholeNumberFirstDigit,
            Int32 lengthWholeNumberSecondDigit,
            Int32 lengthFractionNumberFirstDigit,
            Int32 lengthFractionNumberSecondDigit,
            Decimal lengthValue,
            String lengthUnit,
            Int32 stockAmount,
            Int32 productId,
            Int32 pkgQuanity,
            Boolean useDecimalForSize
        )
        {
            //creating an empty TblProductStock object
            TblProductStock tblProductStock = new TblProductStock();
            tblProductStock.Size = size;
            tblProductStock.Weight = weight;
            tblProductStock.WeightUnit = weightUnit;
            tblProductStock.WidthWholeNumberFirstDigit = widthWholeNumberFirstDigit;
            tblProductStock.WidthWholeNumberSecondDigit = widthWholeNumberSecondDigit;
            tblProductStock.WidthFractionNumberFirstDigit = widthFractionNumberFirstDigit;
            tblProductStock.WidthFractionNumberSecondDigit = widthFractionNumberSecondDigit;
            tblProductStock.WidthValue = widthValue;
            tblProductStock.WidthUnit = widthUnit;
            tblProductStock.DiameterWholeNumberFirstDigit = diameterWholeNumberFirstDigit;
            tblProductStock.DiameterWholeNumberSecondDigit = diameterWholeNumberSecondDigit;
            tblProductStock.DiameterFractionNumberFirstDigit = diameterFractionNumberFirstDigit;
            tblProductStock.DiameterFractionNumberSecondDigit = diameterFractionNumberSecondDigit;
            tblProductStock.DiameterValue = diameterValue;
            tblProductStock.DiameterUnit = diameterUnit;
            tblProductStock.ThreadCountWholeNumberFirstDigit = threadCountWholeNumberFirstDigit;
            tblProductStock.ThreadCountWholeNumberSecondDigit = threadCountWholeNumberSecondDigit;
            tblProductStock.ThreadCountFractionNumberFirstDigit = threadCountFractionNumberFirstDigit;
            tblProductStock.ThreadCountFractionNumberSecondDigit = threadCountFractionNumberSecondDigit;
            tblProductStock.ThreadCountValue = threadCountValue;
            tblProductStock.ThreadCountUnit = threadCountUnit;
            tblProductStock.LengthWholeNumberFirstDigit = lengthWholeNumberFirstDigit;
            tblProductStock.LengthWholeNumberSecondDigit = lengthWholeNumberSecondDigit;
            tblProductStock.LengthFractionNumberFirstDigit = lengthFractionNumberFirstDigit;
            tblProductStock.LengthFractionNumberSecondDigit = lengthFractionNumberSecondDigit;
            tblProductStock.LengthValue = lengthValue;
            tblProductStock.LengthUnit = lengthUnit;
            tblProductStock.StockAmount = stockAmount;
            tblProductStock.ProductId = productId;
            tblProductStock.PkgQuanity = pkgQuanity;
            tblProductStock.UseDecimalForSize = useDecimalForSize;

            return TblProductStock.CreateNewTblProductStock(tblProductStock);
        }

        /************************************************************************************
                 -- UPDATE METHODS (STATIC) --
        *************************************************************************************/

        /************************* Architecure note:**********************************
        Note 1:
        This method is specially useful for the case, where we need to use Object Data Source controls.
        For ObjectDataSource/SqlDataSource controls, the insert/update metnod requires paramters methods, rather property based methods.
        However, there is still a way to pass property based objects as method parameter for data source controls, 
        but in that case we could not use Sql type, as view controls or asp parameter control can only contain few of primitive type.
        The main reason to remain the Sql Type in our object architecture is it is faster and contains better way for null value support.
        
        Note 2: 
        There the two types of paramaters will be passed here.
         * a. Primary key paramater: it should be Sql type, as we will bind the primary key property for the view controls (form view, details view etc) as datakey.
         * b. Non-primary key: it should be primitive type, as the asp paramter control (included in data source control) supports only primitive types.
        /*****************************************************************************/

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public static bool UpdateTblProductStock
        (
            Int32 stockId,
            String size,
            Decimal weight,
            String weightUnit,
            Int32 widthWholeNumberFirstDigit,
            Int32 widthWholeNumberSecondDigit,
            Int32 widthFractionNumberFirstDigit,
            Int32 widthFractionNumberSecondDigit,
            Decimal widthValue,
            String widthUnit,
            Int32 diameterWholeNumberFirstDigit,
            Int32 diameterWholeNumberSecondDigit,
            Int32 diameterFractionNumberFirstDigit,
            Int32 diameterFractionNumberSecondDigit,
            Decimal diameterValue,
            String diameterUnit,
            Int32 threadCountWholeNumberFirstDigit,
            Int32 threadCountWholeNumberSecondDigit,
            Int32 threadCountFractionNumberFirstDigit,
            Int32 threadCountFractionNumberSecondDigit,
            Decimal threadCountValue,
            String threadCountUnit,
            Int32 lengthWholeNumberFirstDigit,
            Int32 lengthWholeNumberSecondDigit,
            Int32 lengthFractionNumberFirstDigit,
            Int32 lengthFractionNumberSecondDigit,
            Decimal lengthValue,
            String lengthUnit,
            Int32 stockAmount,
            Int32 productId,
            Int32 pkgQuanity,
            Boolean useDecimalForSize
        )
        {
            TblProductStock tblProductStock = TblProductStock.GetTblProductStockByStockId(stockId);

            tblProductStock.Size = size;
            tblProductStock.Weight = weight;
            tblProductStock.WeightUnit = weightUnit;
            tblProductStock.WidthWholeNumberFirstDigit = widthWholeNumberFirstDigit;
            tblProductStock.WidthWholeNumberSecondDigit = widthWholeNumberSecondDigit;
            tblProductStock.WidthFractionNumberFirstDigit = widthFractionNumberFirstDigit;
            tblProductStock.WidthFractionNumberSecondDigit = widthFractionNumberSecondDigit;
            tblProductStock.WidthValue = widthValue;
            tblProductStock.WidthUnit = widthUnit;
            tblProductStock.DiameterWholeNumberFirstDigit = diameterWholeNumberFirstDigit;
            tblProductStock.DiameterWholeNumberSecondDigit = diameterWholeNumberSecondDigit;
            tblProductStock.DiameterFractionNumberFirstDigit = diameterFractionNumberFirstDigit;
            tblProductStock.DiameterFractionNumberSecondDigit = diameterFractionNumberSecondDigit;
            tblProductStock.DiameterValue = diameterValue;
            tblProductStock.DiameterUnit = diameterUnit;
            tblProductStock.ThreadCountWholeNumberFirstDigit = threadCountWholeNumberFirstDigit;
            tblProductStock.ThreadCountWholeNumberSecondDigit = threadCountWholeNumberSecondDigit;
            tblProductStock.ThreadCountFractionNumberFirstDigit = threadCountFractionNumberFirstDigit;
            tblProductStock.ThreadCountFractionNumberSecondDigit = threadCountFractionNumberSecondDigit;
            tblProductStock.ThreadCountValue = threadCountValue;
            tblProductStock.ThreadCountUnit = threadCountUnit;
            tblProductStock.LengthWholeNumberFirstDigit = lengthWholeNumberFirstDigit;
            tblProductStock.LengthWholeNumberSecondDigit = lengthWholeNumberSecondDigit;
            tblProductStock.LengthFractionNumberFirstDigit = lengthFractionNumberFirstDigit;
            tblProductStock.LengthFractionNumberSecondDigit = lengthFractionNumberSecondDigit;
            tblProductStock.LengthValue = lengthValue;
            tblProductStock.LengthUnit = lengthUnit;
            tblProductStock.StockAmount = stockAmount;
            tblProductStock.ProductId = productId;
            tblProductStock.PkgQuanity = pkgQuanity;
            tblProductStock.UseDecimalForSize = useDecimalForSize;

            return TblProductStock.UpdateTblProductStock(tblProductStock);
        }

        /************************************************************************************
                         -- DELETE METHODS --
        *************************************************************************************/
        /************************* Architecure note:**********************************
        We have used the employeeId parameter as SqlInt32, to bind the delete method with object data source and view control directly.
        ****************************************************************************/
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
        public static bool DeleteTblProductStock
        (
            Int32 stockId
        )
        {
            //Validate Input
            if (stockId <= GetStockIdMinValue)
                throw (new ArgumentOutOfRangeException("stockId"));

            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);
            AddParameterToSqlCmd(sqlCmd, "@StockId", SqlDbType.Int, 0, ParameterDirection.Input, stockId);
            SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_TBLPRODUCTSTOCK_DELETETBLPRODUCTSTOCK);
            ExecuteScalarCmd(sqlCmd);
            int returnValue = (int)sqlCmd.Parameters["@ReturnValue"].Value;
            return (returnValue == 0 ? false : true);

        }

        /// <summary>
        /// Deletes a set of employees from the database.
        /// </summary>
        public static bool DeleteTblProductStockList(System.Collections.Generic.List<Int32> stockIdListToDelete)
        {
            //Validate Input
            foreach (Int32 stockId in stockIdListToDelete)
                if (stockId <= GetStockIdMinValue)
                    throw (new ArgumentOutOfRangeException("stockId"));

            //performing deletion operation //

            string xmlString = FormatXMLForIdArray(stockIdListToDelete);

            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);
            AddParameterToSqlCmd(sqlCmd, "@StockIdList", SqlDbType.Xml, xmlString.ToString().Length, ParameterDirection.Input, xmlString.ToString());
            SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_TBLPRODUCTSTOCK_DELETETBLPRODUCTSTOCKLIST);
            ExecuteScalarCmd(sqlCmd);
            int returnValue = (int)sqlCmd.Parameters["@ReturnValue"].Value;
            return (returnValue == stockIdListToDelete.Count ? true : false);
        }

        /************************************************************************************
                                 -- GET BY PRIMARY METHODS --
        *************************************************************************************/
        /************************* Architecure note:**********************************
        Retrives an Employee from database, based on it's primary key.
        To view or update an employee, everytime we must have to use this type of 'get' method, 
        since we don't have direct access to the Primary key value for assigning value.
        We have used the employeeId parameter as SqlInt32, to bind the delete method with object data source and view control directly.
        /*****************************************************************************/
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public static TblProductStock GetTblProductStockByStockId(Int32 stockId)
        {
            if (stockId <= GetStockIdMinValue)
                throw (new ArgumentOutOfRangeException("stockId"));

            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            AddParameterToSqlCmd(sqlCmd, "@StockId", SqlDbType.Int, 0, ParameterDirection.Input, stockId);
            SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_TBLPRODUCTSTOCK_GETTBLPRODUCTSTOCKBYSTOCKID);
            GenerateCollectionFromReader test = new GenerateCollectionFromReader(GenerateTblProductStockCollectionFromReader);
            CustomCollection<TblProductStock> objCollection = ((CustomCollection<TblProductStock>)ExecuteReaderCmd(sqlCmd, test));

            if (objCollection.Count > 0)
                return objCollection[0];
            else
                return null;
        }

        /************************************************************************************
                         -- GET BY FOREIGN KEY METHODS --
        *************************************************************************************/

        /************************************************************************************
                 -- GET ALL METHODS --
        *************************************************************************************/
        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public static CustomCollection<TblProductStock> GetAllTblProductStock()
        {

            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_TBLPRODUCTSTOCK_GETALLTBLPRODUCTSTOCK);
            GenerateCollectionFromReader test = new GenerateCollectionFromReader(GenerateTblProductStockCollectionFromReader);
            CustomCollection<TblProductStock> objCollection = ((CustomCollection<TblProductStock>)ExecuteReaderCmd(sqlCmd, test));

            return objCollection;
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public static CustomCollection<TblProductStock> GetAllTblProductStockPaged(String orderBy, Int32 startRowIndex, Int32 maximumRows)
        {
            //Validate Input
            if (orderBy == "")
                orderBy = "StockId";

            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            AddParameterToSqlCmd(sqlCmd, "@orderby", SqlDbType.VarChar, 50, ParameterDirection.Input, orderBy);
            AddParameterToSqlCmd(sqlCmd, "@startrow", SqlDbType.Int, 0, ParameterDirection.Input, startRowIndex);
            AddParameterToSqlCmd(sqlCmd, "@pagesize", SqlDbType.Int, 0, ParameterDirection.Input, maximumRows);

            SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_TBLPRODUCTSTOCK_GETALLTBLPRODUCTSTOCKPAGED);

            GenerateCollectionFromReader test = new GenerateCollectionFromReader(GenerateTblProductStockCollectionFromReader);
            CustomCollection<TblProductStock> objCollection = ((CustomCollection<TblProductStock>)ExecuteReaderCmd(sqlCmd, test));
            return objCollection;
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public static int GetAllTblProductStockPagedCount(String orderBy, Int32 startRowIndex, Int32 maximumRows)
        {
            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();

            AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);
            SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_TBLPRODUCTSTOCK_GETALLTBLPRODUCTSTOCKPAGEDCOUNT);
            ExecuteScalarCmd(sqlCmd);

            int returnValue = (int)sqlCmd.Parameters["@ReturnValue"].Value;
            return returnValue;
        }

        #endregion
        #region Employee Instance Methods
        /************************************************************************************
                                    -- SAVE (INSERT/UPDATE) METHODS (INSTANCE) --
        *************************************************************************************/
        /// <summary>
        /// Saves (inserts and updates) an Employee into database.
        /// The insertion occur if the EmployeeId conatins default value.
        /// Otherwises it updates the Employee into the database, based on the primary key value stored in EmployeeId.
        /// This technique ensures an Employee will not be updated without having a valid EmployeeId.
        /// </summary>
        public bool Save()
        {
            if (StockId <= GetStockIdMinValue)
            {
                Int32 TempId = CreateNewTblProductStock(this);
                if (TempId > 0)
                {
                    _stockId = TempId;
                    return true;
                }
                else
                {
                    // error occurs
                    return false;
                }
            }
            else
            {	//This is a update Command
                return (UpdateTblProductStock(this));
            }

        }

        public static Int32 CreateNewTblProductStock(TblProductStock newTblProductStock)
        {
            // validate Parameters
            if (newTblProductStock == null)
                throw (new ArgumentNullException("newTblProductStock"));

            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            int length = 0;
            AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);

            AddParameterToSqlCmd(sqlCmd, "@Size", SqlDbType.NVarChar, 500, ParameterDirection.Input, newTblProductStock.Size);
            AddParameterToSqlCmd(sqlCmd, "@Weight", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.Weight);
            AddParameterToSqlCmd(sqlCmd, "@WeightUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.WeightUnit);
            AddParameterToSqlCmd(sqlCmd, "@WidthWholeNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.WidthWholeNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@WidthWholeNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.WidthWholeNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@WidthFractionNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.WidthFractionNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@WidthFractionNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.WidthFractionNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@WidthValue", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.WidthValue);
            AddParameterToSqlCmd(sqlCmd, "@WidthUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.WidthUnit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterWholeNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.DiameterWholeNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterWholeNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.DiameterWholeNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterFractionNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.DiameterFractionNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterFractionNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.DiameterFractionNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterValue", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.DiameterValue);
            AddParameterToSqlCmd(sqlCmd, "@DiameterUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.DiameterUnit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountWholeNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ThreadCountWholeNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountWholeNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ThreadCountWholeNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountFractionNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ThreadCountFractionNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountFractionNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ThreadCountFractionNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountValue", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.ThreadCountValue);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.ThreadCountUnit);
            AddParameterToSqlCmd(sqlCmd, "@LengthWholeNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.LengthWholeNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@LengthWholeNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.LengthWholeNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@LengthFractionNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.LengthFractionNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@LengthFractionNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.LengthFractionNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@LengthValue", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.LengthValue);
            AddParameterToSqlCmd(sqlCmd, "@LengthUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.LengthUnit);
            AddParameterToSqlCmd(sqlCmd, "@StockAmount", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.StockAmount);
            AddParameterToSqlCmd(sqlCmd, "@ProductId", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ProductId);
            AddParameterToSqlCmd(sqlCmd, "@PkgQuanity", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.PkgQuanity);
            AddParameterToSqlCmd(sqlCmd, "@UseDecimalForSize", SqlDbType.Bit, 0, ParameterDirection.Input, newTblProductStock.UseDecimalForSize);

            SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_TBLPRODUCTSTOCK_CREATENEWTBLPRODUCTSTOCK);
            ExecuteScalarCmd(sqlCmd);
            return (Int32.Parse(sqlCmd.Parameters["@ReturnValue"].Value.ToString()));

        }
        /// <summary>
        /// Updates an TblProductStock instance to the database.
        /// </summary>
        public static bool UpdateTblProductStock(TblProductStock newTblProductStock)
        {
            // validate Parameters
            if (newTblProductStock == null)
                throw (new ArgumentNullException("newTblProductStock"));

            // Execute SQL Command
            SqlCommand sqlCmd = new SqlCommand();
            int length = 0;
            AddParameterToSqlCmd(sqlCmd, "@ReturnValue", SqlDbType.Int, 0, ParameterDirection.ReturnValue, null);

            AddParameterToSqlCmd(sqlCmd, "@StockId", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.StockId);
            AddParameterToSqlCmd(sqlCmd, "@Size", SqlDbType.NVarChar, 500, ParameterDirection.Input, newTblProductStock.Size);
            AddParameterToSqlCmd(sqlCmd, "@Weight", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.Weight);
            AddParameterToSqlCmd(sqlCmd, "@WeightUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.WeightUnit);
            AddParameterToSqlCmd(sqlCmd, "@WidthWholeNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.WidthWholeNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@WidthWholeNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.WidthWholeNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@WidthFractionNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.WidthFractionNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@WidthFractionNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.WidthFractionNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@WidthValue", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.WidthValue);
            AddParameterToSqlCmd(sqlCmd, "@WidthUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.WidthUnit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterWholeNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.DiameterWholeNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterWholeNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.DiameterWholeNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterFractionNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.DiameterFractionNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterFractionNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.DiameterFractionNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@DiameterValue", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.DiameterValue);
            AddParameterToSqlCmd(sqlCmd, "@DiameterUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.DiameterUnit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountWholeNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ThreadCountWholeNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountWholeNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ThreadCountWholeNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountFractionNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ThreadCountFractionNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountFractionNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ThreadCountFractionNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountValue", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.ThreadCountValue);
            AddParameterToSqlCmd(sqlCmd, "@ThreadCountUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.ThreadCountUnit);
            AddParameterToSqlCmd(sqlCmd, "@LengthWholeNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.LengthWholeNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@LengthWholeNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.LengthWholeNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@LengthFractionNumberFirstDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.LengthFractionNumberFirstDigit);
            AddParameterToSqlCmd(sqlCmd, "@LengthFractionNumberSecondDigit", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.LengthFractionNumberSecondDigit);
            AddParameterToSqlCmd(sqlCmd, "@LengthValue", SqlDbType.Decimal, 9, ParameterDirection.Input, newTblProductStock.LengthValue);
            AddParameterToSqlCmd(sqlCmd, "@LengthUnit", SqlDbType.NVarChar, 50, ParameterDirection.Input, newTblProductStock.LengthUnit);
            AddParameterToSqlCmd(sqlCmd, "@StockAmount", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.StockAmount);
            AddParameterToSqlCmd(sqlCmd, "@ProductId", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.ProductId);
            AddParameterToSqlCmd(sqlCmd, "@PkgQuanity", SqlDbType.Int, 0, ParameterDirection.Input, newTblProductStock.PkgQuanity);
            AddParameterToSqlCmd(sqlCmd, "@UseDecimalForSize", SqlDbType.Bit, 0, ParameterDirection.Input, newTblProductStock.UseDecimalForSize);

            SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_TBLPRODUCTSTOCK_UPDATETBLPRODUCTSTOCK);
            ExecuteScalarCmd(sqlCmd);
            int returnValue = (int)sqlCmd.Parameters["@ReturnValue"].Value;
            return (returnValue == 0 ? false : true);
        }
        #endregion

        #region TblProductStock Related Collections
        /// <summary>
        /// Creates and returns a strongly typed collection of Employee custom entity. 
        /// The colelction is created through iterating on the IdataReader object which contains Employee information, as a set of records, similar to tabular format.
        /// </summary>
        public static CollectionBase GenerateTblProductStockCollectionFromReader(IDataReader returnData)
        {

            //creating the instance of Employee collection
            CustomCollection<TblProductStock> colTblProductStock = new CustomCollection<TblProductStock>();

            /************************* Architecure note:**********************************
             * Below code includes the null value functionality to retieve the data which has nill value in database end.
             * Design consideration:
             * Besides general data fields, special care should be taken for primary keys, to assign '0'/defaultvalue, rather passing 'Null' value in constructor parameter.
             * Although we are considering sqldb tyoe data for the current data container, but while retireving data from database end, through datareader object, we need to cast data reader objects using .net primitive data type, 
             * rather using sqldb type to cast, since data reader objects don't support sql db type to be casted.
             *****************************************************************************/

            //Iterating thriugh the data reader, to generate Employee collection.

            //getting the Employee collection by iterating thru the data reader
            while (returnData.Read())
            {
                //passing the TblProductStock constructor parameters from the current instance of data reader fields.
                TblProductStock newTblProductStock = new TblProductStock
                (
                    returnData["StockId"] == System.DBNull.Value ? GetStockIdMinValue : (Int32)returnData["StockId"],
                    returnData["Size"] == System.DBNull.Value ? string.Empty : (String)returnData["Size"],
                    returnData["Weight"] == System.DBNull.Value ? 0 : (Decimal)returnData["Weight"],
                    returnData["WeightUnit"] == System.DBNull.Value ? string.Empty : (String)returnData["WeightUnit"],
                    returnData["WidthWholeNumberFirstDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["WidthWholeNumberFirstDigit"],
                    returnData["WidthWholeNumberSecondDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["WidthWholeNumberSecondDigit"],
                    returnData["WidthFractionNumberFirstDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["WidthFractionNumberFirstDigit"],
                    returnData["WidthFractionNumberSecondDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["WidthFractionNumberSecondDigit"],
                    returnData["WidthValue"] == System.DBNull.Value ? 0 : (Decimal)returnData["WidthValue"],
                    returnData["WidthUnit"] == System.DBNull.Value ? string.Empty : (String)returnData["WidthUnit"],
                    returnData["DiameterWholeNumberFirstDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["DiameterWholeNumberFirstDigit"],
                    returnData["DiameterWholeNumberSecondDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["DiameterWholeNumberSecondDigit"],
                    returnData["DiameterFractionNumberFirstDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["DiameterFractionNumberFirstDigit"],
                    returnData["DiameterFractionNumberSecondDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["DiameterFractionNumberSecondDigit"],
                    returnData["DiameterValue"] == System.DBNull.Value ? 0 : (Decimal)returnData["DiameterValue"],
                    returnData["DiameterUnit"] == System.DBNull.Value ? string.Empty : (String)returnData["DiameterUnit"],
                    returnData["ThreadCountWholeNumberFirstDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["ThreadCountWholeNumberFirstDigit"],
                    returnData["ThreadCountWholeNumberSecondDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["ThreadCountWholeNumberSecondDigit"],
                    returnData["ThreadCountFractionNumberFirstDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["ThreadCountFractionNumberFirstDigit"],
                    returnData["ThreadCountFractionNumberSecondDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["ThreadCountFractionNumberSecondDigit"],
                    returnData["ThreadCountValue"] == System.DBNull.Value ? 0 : (Decimal)returnData["ThreadCountValue"],
                    returnData["ThreadCountUnit"] == System.DBNull.Value ? string.Empty : (String)returnData["ThreadCountUnit"],
                    returnData["LengthWholeNumberFirstDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["LengthWholeNumberFirstDigit"],
                    returnData["LengthWholeNumberSecondDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["LengthWholeNumberSecondDigit"],
                    returnData["LengthFractionNumberFirstDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["LengthFractionNumberFirstDigit"],
                    returnData["LengthFractionNumberSecondDigit"] == System.DBNull.Value ? 0 : (Int32)returnData["LengthFractionNumberSecondDigit"],
                    returnData["LengthValue"] == System.DBNull.Value ? 0 : (Decimal)returnData["LengthValue"],
                    returnData["LengthUnit"] == System.DBNull.Value ? string.Empty : (String)returnData["LengthUnit"],
                    returnData["StockAmount"] == System.DBNull.Value ? 0 : (Int32)returnData["StockAmount"],
                    returnData["ProductId"] == System.DBNull.Value ? 0 : (Int32)returnData["ProductId"],
                    returnData["PkgQuanity"] == System.DBNull.Value ? 0 : (Int32)returnData["PkgQuanity"],
                    returnData["UseDecimalForSize"] == System.DBNull.Value ? false : (Boolean)returnData["UseDecimalForSize"]

                );
                //adding the Employee to the collection
                colTblProductStock.Add(newTblProductStock);
            }

            //returns the collection of Companys 
            return (colTblProductStock);
        }

        #endregion
        #region Constants and Default Values

        public static Int32 GetStockIdMinValue
        {
            get
            {
                return 0;
            }
        }

        //create method related contants
        internal const string SP_TBLPRODUCTSTOCK_CREATENEWTBLPRODUCTSTOCK = "sp_TblProductStock_CreateNewTblProductStock";
        internal const string SP_TBLPRODUCTSTOCK_UPDATETBLPRODUCTSTOCK = "sp_TblProductStock_UpdateTblProductStock";
        internal const string SP_TBLPRODUCTSTOCK_DELETETBLPRODUCTSTOCK = "sp_TblProductStock_DeleteTblProductStock";
        internal const string SP_TBLPRODUCTSTOCK_DELETETBLPRODUCTSTOCKLIST = "sp_TblProductStock_DeleteTblProductStockList";
        internal const string SP_TBLPRODUCTSTOCK_GETTBLPRODUCTSTOCKBYSTOCKID = "sp_TblProductStock_GetTblProductStockByStockId";
        internal const string SP_TBLPRODUCTSTOCK_GETALLTBLPRODUCTSTOCK = "sp_TblProductStock_GetAllTblProductStock";
        internal const string SP_TBLPRODUCTSTOCK_GETALLTBLPRODUCTSTOCKPAGED = "sp_TblProductStock_GetAllTblProductStockPaged";
        internal const string SP_TBLPRODUCTSTOCK_GETALLTBLPRODUCTSTOCKPAGEDCOUNT = "sp_TblProductStock_GetAllTblProductStockPagedCount";

        #endregion
    }
}
